<script type="text/html" id="module-name">form/profileChange</script>
<div class="wrapper">
	<nav style="left: 14px; margin-top: 0px;top:50px; background:white;" class="sidebar" sidebar="">
		<ul class="nav ng-scope nav-pills  nav-stacked" >
			<li class="ng-scope nav-heading active"><div style="padding:10px;">Profile</div></li>
			<li class="ng-scope nav-heading"><a href="/user/profileChange" class="ng-scope ng-binding">Basic Profile </a></li>
			<li class="ng-scope nav-heading"><a href="/user/resetPassword" class="ng-scope ng-binding">Change Password </a></li>
		</ul>
	</nav>

	<div class="row">
		<div class="col-lg-8 col-md-9 col-lg-offset-2 col-md-offset-3">
			<div class="panel panel-info">
				<div class="panel-heading">
					<h4>Your profile.</h4>
				</div>
				<div class="panel-body">
					<form class="form-horizontal js_update_profile"  enctype="multipart/form-data" role="form" method="post" action="/user/profileChange">

						<div class="form-group">
							<label style="visibility: hidden;" for="inputEmail3" class="col-sm-2 control-label">Photo</label>
							<div class="col-sm-10">
								<img class="img-rounded js_profileimg" alt="" style="margin-top:20px;mah-height:100px; max-width:100px;" src="/Image/getUserImage?id=<?php echo $this->user['photoarray']['feed']['id'];?>"> </img>
                                <input name="profile-image" type="file" style="display: none;">
                                <span
									class="btn btn-default choose-photo-button js_changePhoto"> Change Photo </span>
							</div>
						</div>




                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">Are you a renter</label>
                            <div class="col-sm-10" style="padding-top: 20px; ">
                                <input name="renter" type="checkbox" class="js_rent"
                                       <?php echo $this->user['renter'] == 1 ? 'checked' : '' ?> >
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">Gender</label>
                            <div class="col-sm-10">
                                <select name="gender" class="form-control js_gender">
                                    <option value="-1">Select</option>
                                    <option <?php echo ($this->user['sex'] == 'M' ? 'selected':'') ?> value="M">Male</option>
                                    <option <?php echo ($this->user['sex'] == 'F' ? 'selected':'') ?> value="F">Female</option>
                                </select>
                            </div>
                        </div>

                        <div class="gender_error" style="display: none;">
                            <p class="alert alert-danger">Gender  field is mandatory.</p>
                        </div>



						<div class="form-group">
							<label for="inputEmail3" class="col-sm-2 control-label">Name</label>
							<div class="col-sm-10">
								<input name="name" type="text" value="<?php echo $this->user['name'];?>" class="form-control js_name" placeholder="Your Name">
							</div>

						</div>
                        <div class="name_error" style="display: none;">
                            <p class="alert alert-danger">Name field is mandatory. You can not become anonymous.</p>
                        </div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-2 control-label">About
								Yourself</label>
							<div class="col-sm-10">
								<textarea name="aboutMe" class="form-control js_aboutme" style="width: 100%" ><?php echo $this->user['aboutMe'];?> </textarea>
								 <p class="help-block">Please write about yourself to let your neighbour be more familiar.</p>
							</div>
						</div>
						
						

						<div class="form-group">
							<label for="inputEmail3" class="col-sm-2 control-label">Phone</label>
							<div class="col-sm-10">
								<input type="text" name="phone" class="form-control js_phone" value="<?php echo $this->user['phone'];?>" placeholder="Your Phone">
								 <p class="help-block">It will be only displayed to your apartment-mate.</p>
							</div>
						</div>
						
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
							<div class="col-sm-10">
								<input name="email" value="<?php echo $this->user['email'];?>"  readonly="readonly" ="email" class="form-control js_email"
									placeholder="Email">
							     <p class="help-block">It will be only displayed to your apartment-mate.</p>
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-2 control-label">Birth Day</label>
							<div class="col-sm-10">
								<input name="birthDay" readonly="readonly" value="<?php echo $this->user['birthDay'];?>" class="form-control js_birthday"
									placeholder="Your Birth Day">
								 <p class="help-block">Let your neighbour bless you.</p>
							</div>
						</div>

						<div class="form-group">
							<label for="inputEmail3" class="col-sm-2 control-label">Flat No.</label>
							<div class="col-sm-10">
								<input name="flatNo" readonly="readonly" value="<?php echo $this->user['flatNumber'];?>" type="text" class="form-control js_flatno"
									placeholder="Your Flat">
							     <p class="help-block">Flat that you are living.</p>
							</div>

						</div>
                        <div class="flat_error" style="display: none;">
                            <p class="alert alert-danger">Please provide which flat you are living.</p>
                        </div>

						<div class="form-group">
							<label for="inputEmail3" class="col-sm-2 control-label">Profession</label>
							<div class="col-sm-10">
								<input name="profession" value="<?php echo $this->user['profession'];?>" type="text" class="form-control js_profession"
									placeholder="Your Profession">
								<p class="help-block">We ask for this information because sometimes your neighbours may need your expertise to your
								as well as their benefit.</p>
							</div>
						</div>
						
						<div class="form-group" style="display: none;">
							<label for="inputEmail3"  class="col-sm-2 control-label js_post">Post</label>
							<div class="col-sm-10">
								<input name="post" type="text" class="form-control" value="<?php echo $this->user['post'];?>"
									placeholder="Your Post">
								<p class="help-block">If you hold any post in your society e.g General secretary, security in-charge etc. then please mention here.</p>
							</div>
						</div>

						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<button type="submit" class="btn btn-default js_submit">Update</button>
							</div>
						</div>
					</form>

				</div>

			</div>
		</div>
	</div>
</div>

<?php
$env = getenv('APP_ENV') ?: 'production';
if($env != 'production') {
    echo '<script data-main="/js/app" src="/js/lib/require.js"></script>';
}
?>